﻿namespace VideoTools.vo
{
    public class Subtitle
    {

        public int Number { get; set; }
        public TimeSpan StartTime { get; set; }
        public TimeSpan EndTime { get; set; }
        public string Text { get; set; }

        public Subtitle(int number, TimeSpan startTime, TimeSpan endTime, string text)
        {
            Number = number;
            StartTime = startTime;
            EndTime = endTime;
            Text = text;
        }

        public override string ToString()
        {
            //return $"{Number} {StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}  {Text}";
            return $"{Number}\n{StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}\n{Text}\n";
        }
    }

    public class SubtitleDue : Subtitle
    {

        public string Text1 { get; set; }

        public SubtitleDue(int number, TimeSpan startTime, TimeSpan endTime, string text, string text1) : base(number, startTime, endTime,text)
        {
            Text1 = text1;
        }

        public override string ToString()
        {
            //return $"{Number} {StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}  {Text}";
            return $"{Number}\n{StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}\n{Text}\n{Text1}\n";
        }

        public string ToString1()
        {
            //return $"{Number} {StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}  {Text}";
            return $"{Number}\n{StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}\n{Text}\n";
        }

        public string ToString2()
        {
            //return $"{Number} {StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}  {Text}";
            return $"{Number}\n{StartTime:hh\\:mm\\:ss\\,fff} --> {EndTime:hh\\:mm\\:ss\\,fff}\n{Text1}\n";
        }
    }
}
